\(\int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx\) [1064]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 32, antiderivative size = 39 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 c e} \]

[Out]

1/2*(e*x+d)*(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2)/c/e

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {656, 623} \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 c e} \]

[In]

Int[(d + e*x)^2/Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2],x]

[Out]

((d + e*x)*Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2])/(2*c*e)

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rule 656

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[e^m/c^(m/2), Int[(a +
b*x + c*x^2)^(p + m/2), x], x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && EqQ[
2*c*d - b*e, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx}{c} \\ & = \frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 c e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.77 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {x (d+e x) (2 d+e x)}{2 \sqrt {c (d+e x)^2}} \]

[In]

Integrate[(d + e*x)^2/Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2],x]

[Out]

(x*(d + e*x)*(2*d + e*x))/(2*Sqrt[c*(d + e*x)^2])

Maple [A] (verified)

Time = 2.98 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.97

method result size
gosper \(\frac {x \left (e x +2 d \right ) \left (e x +d \right )}{2 \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}\) \(38\)
default \(\frac {x \left (e x +2 d \right ) \left (e x +d \right )}{2 \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}\) \(38\)
trager \(\frac {x \left (e x +2 d \right ) \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}{2 c \left (e x +d \right )}\) \(43\)
risch \(\frac {\left (e x +d \right ) e \,x^{2}}{2 \sqrt {c \left (e x +d \right )^{2}}}+\frac {\left (e x +d \right ) d x}{\sqrt {c \left (e x +d \right )^{2}}}\) \(43\)

[In]

int((e*x+d)^2/(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*x*(e*x+2*d)*(e*x+d)/(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.13 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {\sqrt {c e^{2} x^{2} + 2 \, c d e x + c d^{2}} {\left (e x^{2} + 2 \, d x\right )}}{2 \, {\left (c e x + c d\right )}} \]

[In]

integrate((e*x+d)^2/(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(c*e^2*x^2 + 2*c*d*e*x + c*d^2)*(e*x^2 + 2*d*x)/(c*e*x + c*d)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 138 vs. \(2 (36) = 72\).

Time = 0.79 (sec) , antiderivative size = 138, normalized size of antiderivative = 3.54 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\begin {cases} \left (\frac {d}{2 c e} + \frac {x}{2 c}\right ) \sqrt {c d^{2} + 2 c d e x + c e^{2} x^{2}} & \text {for}\: c e^{2} \neq 0 \\\frac {\frac {d^{2} \sqrt {c d^{2} + 2 c d e x}}{4} + \frac {\left (c d^{2} + 2 c d e x\right )^{\frac {3}{2}}}{6 c} + \frac {\left (c d^{2} + 2 c d e x\right )^{\frac {5}{2}}}{20 c^{2} d^{2}}}{c d e} & \text {for}\: c d e \neq 0 \\\frac {\begin {cases} d^{2} x & \text {for}\: e = 0 \\\frac {\left (d + e x\right )^{3}}{3 e} & \text {otherwise} \end {cases}}{\sqrt {c d^{2}}} & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)**2/(c*e**2*x**2+2*c*d*e*x+c*d**2)**(1/2),x)

[Out]

Piecewise(((d/(2*c*e) + x/(2*c))*sqrt(c*d**2 + 2*c*d*e*x + c*e**2*x**2), Ne(c*e**2, 0)), ((d**2*sqrt(c*d**2 +
2*c*d*e*x)/4 + (c*d**2 + 2*c*d*e*x)**(3/2)/(6*c) + (c*d**2 + 2*c*d*e*x)**(5/2)/(20*c**2*d**2))/(c*d*e), Ne(c*d
*e, 0)), (Piecewise((d**2*x, Eq(e, 0)), ((d + e*x)**3/(3*e), True))/sqrt(c*d**2), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (35) = 70\).

Time = 0.20 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.79 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {c^{2} d^{2} e^{4} \log \left (x + \frac {d}{e}\right )}{\left (c e^{2}\right )^{\frac {5}{2}}} - \frac {c d e^{3} x}{\left (c e^{2}\right )^{\frac {3}{2}}} + \frac {e^{2} x^{2}}{2 \, \sqrt {c e^{2}}} - d^{2} \sqrt {\frac {1}{c e^{2}}} \log \left (x + \frac {d}{e}\right ) + \frac {2 \, \sqrt {c e^{2} x^{2} + 2 \, c d e x + c d^{2}} d}{c e} \]

[In]

integrate((e*x+d)^2/(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="maxima")

[Out]

c^2*d^2*e^4*log(x + d/e)/(c*e^2)^(5/2) - c*d*e^3*x/(c*e^2)^(3/2) + 1/2*e^2*x^2/sqrt(c*e^2) - d^2*sqrt(1/(c*e^2
))*log(x + d/e) + 2*sqrt(c*e^2*x^2 + 2*c*d*e*x + c*d^2)*d/(c*e)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.59 \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\frac {e x^{2} + 2 \, d x}{2 \, \sqrt {c} \mathrm {sgn}\left (e x + d\right )} \]

[In]

integrate((e*x+d)^2/(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="giac")

[Out]

1/2*(e*x^2 + 2*d*x)/(sqrt(c)*sgn(e*x + d))

Mupad [F(-1)]

Timed out. \[ \int \frac {(d+e x)^2}{\sqrt {c d^2+2 c d e x+c e^2 x^2}} \, dx=\int \frac {{\left (d+e\,x\right )}^2}{\sqrt {c\,d^2+2\,c\,d\,e\,x+c\,e^2\,x^2}} \,d x \]

[In]

int((d + e*x)^2/(c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^(1/2),x)

[Out]

int((d + e*x)^2/(c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^(1/2), x)